import { Router } from 'express';
import TCMController from '../controllers/tcmController';
import MedicinalCuisineController from '../controllers/medicinalCuisineController';
import WellnessKnowledgeController from '../controllers/wellnessKnowledgeController';
import ProductController from '../controllers/productController';
import OrderController from '../controllers/orderController';
import ForumController from '../controllers/forumController';
import UserController from '../controllers/userController';

const router = Router();

// TCM Knowledge Routes
router.get('/tcm', TCMController.getAll);
router.post('/tcm', TCMController.create);
router.get('/tcm/:id', TCMController.getById);
router.put('/tcm/:id', TCMController.update);
router.delete('/tcm/:id', TCMController.delete);

// Medicinal Cuisine Routes
router.get('/medicinal-cuisine', MedicinalCuisineController.getAll);
router.post('/medicinal-cuisine', MedicinalCuisineController.create);
router.get('/medicinal-cuisine/:id', MedicinalCuisineController.getById);
router.put('/medicinal-cuisine/:id', MedicinalCuisineController.update);
router.delete('/medicinal-cuisine/:id', MedicinalCuisineController.delete);

// Wellness Knowledge Routes
router.get('/wellness', WellnessKnowledgeController.getAll);
router.post('/wellness', WellnessKnowledgeController.create);
router.get('/wellness/:id', WellnessKnowledgeController.getById);
router.put('/wellness/:id', WellnessKnowledgeController.update);
router.delete('/wellness/:id', WellnessKnowledgeController.delete);

// Product Management Routes
router.get('/products', ProductController.getAll);
router.post('/products', ProductController.create);
router.get('/products/:id', ProductController.getById);
router.put('/products/:id', ProductController.update);
router.delete('/products/:id', ProductController.delete);

// Order Management Routes
router.get('/orders', OrderController.getAll);
router.post('/orders', OrderController.create);
router.get('/orders/:id', OrderController.getById);
router.put('/orders/:id', OrderController.update);
router.delete('/orders/:id', OrderController.delete);

// Forum Management Routes
router.get('/forum', ForumController.getAll);
router.post('/forum', ForumController.create);
router.get('/forum/:id', ForumController.getById);
router.put('/forum/:id', ForumController.update);
router.delete('/forum/:id', ForumController.delete);

// User Information Management Routes
router.get('/users', UserController.getAll);
router.post('/users', UserController.create);
router.get('/users/:id', UserController.getById);
router.put('/users/:id', UserController.update);
router.delete('/users/:id', UserController.delete);

export default router;